//
//  ViewController.m
//  07--UITabBarController
//
//  Created by 冀永金 on 16/7/22.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "ViewController.h"
#import "VCOfFirst.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.translucent = NO;
    self.navigationController.navigationBar.barTintColor = [UIColor blueColor];
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.view addSubview:button];
    button.frame = CGRectMake(10, 10, 100, 80);
    button.backgroundColor = [UIColor blackColor];
    [button addTarget:self action:@selector(handle:) forControlEvents:UIControlEventTouchUpInside];
    // Do any additional setup after loading the view, typically from a nib.
}
- (void)handle:(UIButton *)button {
    VCOfFirst *first = [[VCOfFirst alloc]init];
    UINavigationController *navi = [[UINavigationController alloc]initWithRootViewController:first];
    [self presentViewController:navi animated:YES completion:^{
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
